<script>var SITE_URL = "<?php echo BASE_URL; ?>";</script>
<script src="<?php echo BASE_URL . ADDONPATH; ?>modules/saef/js/saef-min.js"></script>

<div class="widget">
<?php echo form_open('saef/saef/post', array('id'=>'saef-form')); ?>
	<div id="saef-message" class="alert"></div>
	<!-- uncomment below to show "requires moderation" message -->
	<!-- <?php if($requires_moderation): ?>
	<p id="moderate-required"><?php echo lang('saef:requires_moderation'); ?></p>
	<?php endif; ?> -->
	<div class="form_inputs">
		<ul>
			<li class="even">
				<label for="title"><?php echo lang('saef:post_title_label'); ?> <span>*</span></label>
				<div class="input"><?php echo form_input('title', set_value('title'), 'maxlength="100" id="title"'); ?></div>				
			</li>
			
			<li>
				<label for="category"><?php echo lang('saef:post_category_label'); ?> <span>*</span></label>
				<div class="input">
					<select name="category" id="category">
						<option value="">Select</option>
						<?php foreach($categories as $cat): ?>
						<option value="<?php echo $cat->cat_id; ?>" <?php echo set_select('category', $cat->cat_id); ?>><?php echo $cat->title; ?></option>
						<?php endforeach; ?>
					</select>
				</div>
			</li>
			
			<li class="even editor">
				<label for="introduction"><?php echo lang('saef:post_introduction_label'); ?></label>
				<?php echo form_textarea(array('id' => 'introduction', 'name' => 'introduction', 'value' => set_value('introduction'), 'rows' => 6, 'class'=> 'wysiwyg-simple')); ?>
			</li>
			
			<li class="editor">
				<label for="body"><?php echo lang('saef:post_body_label'); ?> <span>*</span></label>
								
				<?php echo form_textarea(array('id' => 'body', 'name' => 'body', 'value' => set_value('body'), 'rows' => 30, 'class' => 'wysiwyg-simple')); ?>				
			</li>
		</ul>		
	</div>
	<div class="form_actions">
		<button type="submit" name="btnAction" value="<?php echo lang('saef:submit_button_value') ?>" class="btn blue">
			<span><?php echo lang('saef:submit_button_display'); ?></span>
		</button>
	</div>
<?php echo form_close(); ?>
</div>